#include"head.h"

void PrintStoreAllInfo(ptask regood)
{
	int index = 0;
	for(index ; index <= regood->allgoodlist.index;index++ )
	{	
		printf("%-14s%-10s%0.2f%-6s%0.2f%20s%4d%4s\n",regood->allgoodlist.attr[index].commoditycode,
			regood->allgoodlist.attr[index].commodityname,
			regood->allgoodlist.attr[index].spec,
			regood->allgoodlist.attr[index].kg,
			regood->allgoodlist.attr[index].price,
			regood->allgoodlist.attr[index].sell_by_data,
			regood->allgoodlist.attr[index].validitydata,
			regood->allgoodlist.attr[index].valibuf);
	}
}

void PrintSignalList(ptask good)
{
	LinkList p1 = good->choosegood;
	
	while(p1->next != NULL)
	{
		p1 = p1->next;
		printf("%-14s\n",p1->commoditycode);
	}
	
}

void PrintPurchaseGoodInfo(ptask good )
{
	DLinkList  p1 = good->goodlist;
	while(p1->next != NULL)
	{
		p1 = p1->next;
		printf("%-14s%-10s%0.2f%-6s%0.2f%20s%4d\n",p1->attr.commoditycode,
			p1->attr.commodityname,
			p1->attr.spec,
			p1->attr.kg,
			p1->attr.price,
			p1->attr.sell_by_data,
			p1->attr.validitydata);		
	}
}